package unmsm.eapisw.taller.srh_persistencia.dao.impl;

import org.hibernate.SessionFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import unmsm.eapisw.taller.srh_persistencia.dao.IHabitacionIMGDAO;
import unmsm.eapisw.taller.srh_persistencia.modelo.HabitacionIMG;


public class HabitacionIMGDAO implements IHabitacionIMGDAO{
	private SessionFactory sessionFactory;

	/**
	 * Get Hibernate Session Factory
	 * 
	 * @return SessionFactory - Hibernate Session Factory
	 */
	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	/**
	 * Set Hibernate Session Factory
	 * 
	 * @param SessionFactory
	 *            - Hibernate Session Factory
	 */
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
	
	public int insertHabitacionIMG(HabitacionIMG ho) {
		getSessionFactory().getCurrentSession().persist(ho);
		return ho.getId();
	}

	public void updateHabitacionIMG(HabitacionIMG ho) {
		getSessionFactory().getCurrentSession().update(ho);
		
	}

	public void deleteHabitacionIMG(HabitacionIMG ho) {
		// TODO Auto-generated method stub
		
	}

	public HabitacionIMG getHabitacionIMGById(int id) {
		// TODO Auto-generated method stub
		return null;
	}

}
